var app = getApp()
Page({
  data: {
    list: [],
    loading: true,
    listStatus: false
  },
  onLoad: function (options) {
    app.fetchApi("https://cake.cindata.cn/opportunity/getOpportunityByOpenId", (err, data) => {
      if (!data.errorCode) {
        if (data.length > 0) {
          this.setData({
            list: data,
            listStatus: false,
            loading: false
          })
        } else {
          this.setData({
            list: data,
            listStatus: true,
            loading: false
          })
        }
      }
    })
  }
})